<?php
/**
 * 家
 * User: ZengYou
 * Date: 2020/2/15 22:40
 * Created by : PhpStorm
 */
use think\facade\Route;
use app\common\middleware\Admin;

// 登录
Route::post('login', 'Home/login')->allowCrossDomain(headers());

Route::group(function () {
    // 主页
    Route::post('index', 'index');
    // 退出登录
    Route::post('loginOut', 'Home/loginOut');
})->prefix('Home/')->allowCrossDomain(headers())->middleware(Admin::class);
